Current Location: Home> Function Categories> date_timestamp_get

date_timestamp_get

DateTime::getTimestamp alias - Get Unix timestamp
Name:date_timestamp_get
Category:Date and time
Programming Language:php
One-line Description:Returns a Unix timestamp.

Definition and usage

date_timestamp_get() function returns a Unix timestamp.

Example

Returns the Unix timestamp of today's date and time:

 <?php
$date = date_create ( ) ;
echo date_timestamp_get ( $date ) ;
?>

Try it yourself

grammar

 date_timestamp_get ( object ) ;
parameter describe
object Required. Specifies the DateTime object returned by date_create() .
Similar Functions
Popular Articles